package com.szholly.pro.watergas_server.ps.controller;


import java.util.HashMap;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.szholly.pro.watergas_server.common.util.JsonUtil;
import com.szholly.pro.watergas_server.common.web.BaseController;
import com.szholly.pro.watergas_server.common.web.RequestUnit;
import com.szholly.pro.watergas_server.ps.service.PollInfoService;
import com.szholly.data.general.RowBase;

@Controller
@RequestMapping("/PollInfo/*")
public class PollInfoController extends BaseController {
	@Autowired
	PollInfoService pollInfoService;	

	/*
	 * 查询本专题站点列表
	 */
	@RequestMapping(value = "/getMulitStationPollDict")
	public void getMulitStationPollDict(HttpServletRequest resq, HttpServletResponse res) throws Exception {
		String stationCodesStr = RequestUnit.getString("STATION_ID");
		String[] stationCodes = stationCodesStr.split(",");
		HashMap<String, List<RowBase>> result = pollInfoService.getMulitStationPolls(stationCodes);
		
		String resultJson = JsonUtil.ConvertObjectToJson(result);
		outString(resultJson);
	}
	
	
	
}
